package servlet;

import bean.Request;
import bean.Response;
import errors.HTTPMethodNotSupportException;

import java.io.PrintWriter;

public class LoginServlet extends  Servlet {
    @Override
    public void doPost(Request request, Response response) throws HTTPMethodNotSupportException {
        String name = request.getParam("name");
        String password = request.getParam("password");
        PrintWriter printWriter = new PrintWriter(response.getOutputStream());
        printWriter.printf("<h1>你的名字是 " + name + "</h1>");
        printWriter.printf("<h1>你的密码是 " + password + "</h1>");
        printWriter.flush();
    }
}
